package com.jk.sec.controller;

import com.jk.DiscussBean;
import com.jk.LookBean;
import com.jk.MovieBean;
import com.jk.UserBean;
import com.jk.sec.service.SecBuyService;
import com.jk.service.SecUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.text.ParseException;
import java.util.List;

@RestController
public class SecBuyController implements SecUserService {

    @Autowired
    private SecBuyService secBuyService;

    /**
     * @Author: 孙尔超
     * @Description: 查看影片详情给
     * @Date: 2021/5/21 15:09
     * @param ids
     * @Return: com.jk.MovieBean
     **/
    @Override
    public MovieBean ticket(Integer ids) {
        return secBuyService.goupiao(ids);
    }
/**
 * @Author: 孙尔超
 * @Description: 我的短评
 * @Date: 2021/5/21 15:09
 * @Return: com.jk.DiscussBean
 **/
    @Override
    public void discuss(String content,Integer ids, UserBean user,Integer star){
        secBuyService.discuss(content,ids,user,star);
    }
    /**
     * @Author: 孙尔超
     * @Description: 查看所有评论
     * @Date: 2021/5/21 16:11
     * @Return: java.util.List<com.jk.DiscussBean>
     **/
    public List<DiscussBean> findDiscuss(Integer ids){
        return secBuyService.findDiscuss(ids);
    }
    /**
     * @Author: 孙尔超
     * @Description: 点赞
     * @Date: 2021/5/21 17:28
     * @param ids
     * @Return: void
     **/
    @Override
    public void like(String ids,Integer give,String id,UserBean user) {
        secBuyService.like(ids,give,id,user);
    }
        /*
         * @Author: 孙尔超
         * @Description: 评分查询
         * @Date: 2021/5/23 19:09
         * @Return: java.util.List<com.jk.MovieBean>
         **/

    @Override
    public List<MovieBean> monthlyFocus() {
        return secBuyService.monthlyFocus();
    }

    /**
     * @Author: 孙尔超
     * @Description: 想看人数排序
     * @Date: 2021/5/23 21:44
     * @Return: java.util.List<com.jk.MovieBean>
     **/
    @Override
    public List<MovieBean> expect() {
        return secBuyService.expect();
    }

    /**
     * @Author: 孙尔超
     * @Description: 票房排序
     * @Date: 2021/5/23 21:44
     * @Return: java.util.List<com.jk.MovieBean>
     **/
    @Override
    public List<MovieBean> boxoffice() {
        return secBuyService.boxoffice();
    }
    /**
     * @Author: 孙尔超
     * @Description: 查询电影的所有演员
     * @Date: 2021/5/25 15:14
     * @param ids
     * @Return: java.util.List<com.jk.MovieBean>
     **/
    @Override
    public List<MovieBean> findActor(Integer ids) {
        return secBuyService.findActor(ids);
    }
    /**
     * @Author: 孙尔超
     * @Description: 查询评分的总条数
     * @Date: 2021/5/25 16:32
     * @param ids
     * @Return: java.lang.String
     **/
    @Override
    public Integer scorecount(Integer ids) {
       return secBuyService.scorecount(ids);
    }
    /**
     * @Author: 孙尔超
     * @Description: 相关电影
     * @Date: 2021/6/7 16:08
     * @param typeid
     * @Return: java.util.List<com.jk.MovieBean>
     **/
    @Override
    public List<MovieBean> relatedMovie(String typeid) {
        return secBuyService.relatedMovie(typeid);
    }
        /**
         * @Author: 孙尔超
         * @Description: 上映电影
         * @Date: 2021/6/7 16:08
         * @Return: void
         **/
    @Override
    public void show() throws ParseException {
         secBuyService.show();
    }
    /**
     * @Author: 孙尔超
     * @Description: 查询平均评分
     * @Date: 2021/6/7 22:44
     * @Return: java.lang.Double
     **/
    @Override
    public Double star(Integer ids) {
        return secBuyService.star(ids);
    }
    /**
     * @Author: 孙尔超
     * @Description: 想看桃心
     * @Date: 2021/6/8 11:16
     * @param ids
     * @param user
     * @Return: com.jk.LookBean
     **/
    @Override
    public LookBean havaLook(Integer ids, UserBean user) {
        return secBuyService.havaLook(ids,user);
    }
    /**
     * @Author: 孙尔超
     * @Description: 点击i想看
     * @Date: 2021/6/8 12:11
     * @param ids
     * @param user
     * @Return: void
     **/
    @Override
    public void loveLook(Integer ids, UserBean user) {
        secBuyService.loveLook(ids,user);
    }
        /**
         * @Author: 孙尔超
         * @Description: 点击已想看
         * @Date: 2021/6/8 12:11
         * @param ids
         * @param user
         * @Return: void
         **/
    @Override
    public void loveLooks(Integer ids, UserBean user) {
        secBuyService.loveLooks(ids,user);
    }


}
